# import datetime
# import lib.mysql as mysql
# import lib.config as config
# import lib.util as util
#
# # def save():
# #     call_ride_sql="SELECT * FFROM realtime_call"
# #     return db.getRows(sql)
#
#
# if __name__ == '__main__':
#     print('生成每日叫车图表数据')
#     start_time = util.get_start_date()
#     end_time = util.get_end_date()
#     current_time = datetime.datetime.now()
#     if end_time is None:
#         # 转为指定格式
#         end_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
#     else:
#         end_time = f"{end_time} 23:59:59"
#
#     if start_time is None:
#         start_time = datetime.datetime.strptime(end_time, "%Y-%m-%d %H:%M:%S") - datetime.timedelta(days=1)
#         start_time = start_time.strftime("%Y-%m-%d %H:%M:%S")
#     else:
#         start_time = f"{start_time} 00:00:00"
#     current_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
#     util.add_log(f"即将处理 {start_time} - {end_time} 的收入数据")
#     db_master = mysql.Db(config.config['mysql']['master'])
#     db_slave = mysql.Db(config.config['mysql']['slave'])
#     call_ride_sql = "SELECT * FROM realtime_call"
#     realtime_call_data = db_master.getRows(call_ride_sql)
#     print(realtime_call_data)
